<?php
	

include('db_connect.php');

include('fun_kunde.php');

if($_POST['kundentyp'] == "firma") {
	$query = mysql_query('SELECT *, ID as KundeID from kunde where Firma is not null order by Vorname');
	postKundenTabelle($query);

} elseif($_POST['kundentyp'] == "privat") {
	$query = mysql_query('SELECT *, ID as KundeID from kunde where Firma is null order by Vorname');
	postKundenTabelle($query);
} else {
	$query = mysql_query('SELECT *, ID as KundeID from kunde order by Vorname');
	postKundenTabelle($query);
}

?>